<?php
include 'User.php';
class Useradmin extends User {
    public function kiemtradangnhapadmin($user,$pass){
        $sql = "select * from `users` as u where u.UserName = '$user' and u.Pass = '$pass' and u.Loai_User=1";
        $row = $this->dataProvider->GetOneRow($sql);
        if(!empty($row)){
           $_SESSION['admin_id_user'] = $row['UserName'];
           return true;
        }
        return !empty($row);
    }
}
?>
